package com.helloworld.springcloud.config;


import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Copyright (C), XXX 软件公司
 * FileName: MyselfRule
 * Author:   sisyphus
 * Date:     2021/7/13
 * Description:
 */
@Configuration
public class MyselfRule {

    @Bean
    public IRule myRule() {
        return new RandomRule();  // 随机规则
    }
}

